The present invention relates in general to data processing systems, and in particular, to three-dimensional graphics rendering in a data processing system.
When computing lighting data for three-dimensional (3D) graphics applications, it is customary to maintain and transmit a normal vector with every vertex of each object to be rendered. These normal vectors are transmitted to the graphics hardware or software that is rendering the object, and that uses them in conjunction with a vector to the object observation point (xe2x80x9ceye vectorxe2x80x9d) and vector to the light source (xe2x80x9clight vectorxe2x80x9d) to determine the lighting characteristics at the corresponding vertex. The normal vectors are provided by the graphics application generating the object that is to be rendered by the graphics engine.
Each normal vector requires that, in typical graphics implementations, twelve bytes of data be sent. This corresponds to four bytes representing each component in a 3D normal vector. This, in turn, places a significant burden on data buses, which may include input/output (I/O) buses and memory buses, when rendering 3D graphical objects in supporting the data rates generated by the graphical information at each vertex of the object. Moreover, data is typically fed to the graphics engine via I/O bus direct memory accesses (DMA). This, in turn, requires that cached vertex data must be cast out to memory where it can be retrieved by the graphics engine via a DMA. This increases the bus traffic even more. Moreover, caching the three components of each normal vector consumes cache memory.
In modern data processing systems, increases in central processing unit (CPU) speed have outstripped bus performance. Consequently, in the rendering of 3D graphics objects, the bus has become the bottleneck, not the CPU. Therefore, there is a need in the art, for apparatus and methods for reducing bus traffic, and increasing cache utilization in 3D graphics rendering operations.
The aforementioned needs are addressed by the present invention. Accordingly, there is provided, in a first form, a method of graphics rendering. The method includes the steps of generating a first scalar product of a first vector and a second vector, and outputting the first scalar product to a graphics engine in lieu of components of the first and second vectors.
There is also provided, in a second form, a data processing system that contains circuitry operable for generating a first scalar product of a first vector and a second vector. Also included is circuitry operable for outputting the first scalar product to a graphics engine in lieu of components of the first and second vectors.
Additionally, there is provided, in a third form, a computer program product operable for storage on program storage media. The program product is operable for graphics rendering, and includes programming for generating a first scalar product of a first vector and a second vector, and programming for outputting the first scalar product to a graphics engine in lieu of components of the first and second vectors.
The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention.